package cn.nubia.admin.api.jinshan.bean;

import cn.nubia.admin.api.jinshan.helper.ErrorMessageHelper;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by wangj on 2015/7/23.
 */
public class CheckFileResult {
    /**
     * md5: 要扫描文件的MD5。
     */
    private String md5;
    /**
     * 要扫描文件的安全状态。0 失败2 安全3 病毒
     */
    private Integer safe_type;
    /**
     * 错误代码
     */
    private Integer error;
    /**
     * 要扫描的文件的标识,提交查询时设置的标识，如未设置则不存在此字段。
     */
    private String flag;
    /**
     * 是否为恶意广告，1 恶意，0 非恶意。
     */
    private Integer adevil;
    /**
     * 病毒名(可选,非病毒无此字段)
     */
    private String virus_name;
    /**
     * 危险病毒行为列表(可选,非病毒无此字段)
     */
    private List<Integer> virus_desc;

    private List<AdInfo> adinfo;

    public List<String> getEvilMessage() {
        return ErrorMessageHelper.getMessages(ErrorMessageHelper.VIRUS_DESC, virus_desc);
    }

    public String getErrorMessage() {
        return ErrorMessageHelper.getMessage(ErrorMessageHelper.CHECK_RESULT, error);
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public Integer getSafe_type() {
        return safe_type;
    }

    public void setSafe_type(Integer safe_type) {
        this.safe_type = safe_type;
    }

    public Integer getError() {
        return error;
    }

    public void setError(Integer error) {
        this.error = error;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public Integer getAdevil() {
        return adevil;
    }

    public void setAdevil(Integer adevil) {
        this.adevil = adevil;
    }

    public String getVirus_name() {
        return virus_name;
    }

    public void setVirus_name(String virus_name) {
        this.virus_name = virus_name;
    }

    public List<Integer> getVirus_desc() {
        return virus_desc;
    }

    public void setVirus_desc(List<Integer> virus_desc) {
        this.virus_desc = virus_desc;
    }

    public List<AdInfo> getAdinfo() {
        return adinfo;
    }

    public void setAdinfo(List<AdInfo> adinfo) {
        this.adinfo = adinfo;
    }

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(1001);

        CheckFileResult checkFileResult = new CheckFileResult();
        checkFileResult.setVirus_desc(list);

        System.out.println(checkFileResult.getEvilMessage());
    }
}
